IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GetWorkflowDetailedComments]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[GetWorkflowDetailedComments]
GO
/******************************************************************            
* Name:				 [GetWorkflowDetailedComments]            
* Purpose:			 Get Information about protocol
* Note:		            
* PARAMETERS(IN)            
* Name				 Description                 
* -------------      -------------------------------------------            
* @executionId       Id to get all the information about protocol
*********************************************************************/            
CREATE PROCEDURE [dbo].[GetWorkflowDetailedComments]            
(            
	@executionId int	
)            
AS BEGIN            

	SET NOCOUNT ON 

	SELECT comments 
	FROM swactivityList
	WHERE executionId = @executionId	
	ORDER BY LastUpdatedDateTime desc

END

GO

